cmake_minimum_required(VERSION 3.8)
project(bs_norm)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)

find_package(rclcpp REQUIRED)
find_package(rosidl_default_generators REQUIRED)


find_package(bs_complex REQUIRED)


# 添加msg的文件依赖
set( msg_files
  ""
)
set( srv_files
  "srv/Norm.srv"
)

rosidl_generate_interfaces(${PROJECT_NAME}
  ${msg_files}  
  ${srv_files}  
  DEPENDENCIES bs_complex
)
ament_export_dependencies(rosidl_default_runtime)


add_executable( norm_serve src/norm_serve.cpp )
ament_target_dependencies( norm_serve "rclcpp" )
rosidl_target_interfaces( norm_serve ${PROJECT_NAME} "rosidl_typesupport_cpp" )

add_executable( norm_client src/norm_client.cpp )
ament_target_dependencies( norm_client "rclcpp" )
rosidl_target_interfaces( norm_client ${PROJECT_NAME} "rosidl_typesupport_cpp" )

install( TARGETS 
  norm_serve 
  norm_client
  DESTINATION lib/${PROJECT_NAME}
)

ament_package()
